import vue from "vue"
import GlobalMessage from  './GlobalMessage.vue';
const MessageConstructor= vue.extend(GlobalMessage)
function showMessage(text,duration){
    const MessageDom=new MessageConstructor({
        el:document.createElement('view'),
        data(){
            return {
                text:text,
            }
        }
    })
    document.body.appendChild(MessageDom.$el)
}
function registryMessage(){
    vue.prototype.$message=showMessage
}
export default registryMessage